XML Type Checking for Macro Tree Transducers with Holes
نویسندگان
چکیده
Macro forest transducers (mfts) extend macro tree transducers (mtts) from ranked to unranked trees. Mfts are more powerful than mtts (operating on binary tree encodings) because they support sequence concatenation of output trees as build-in operation. Surprisingly, inverse type inference for mfts, for a fixed output type, can be done within the same complexity as for mtts. Inverse type inference is used in algorithms for exact type checking of XML transformations. The macro tree transducer with holes (hmtt) is a new concept that is introduced in this paper. It generalizes sequence concatenation of mfts to arbitrary tree concatenation. Hmtts are strictly more powerful than mfts, in a similar way as mfts are more powerful than mtts. Again, it comes as a surprise that inverse type inference remains within the same complexity bound as for mfts. Hmtts are a natural and robust extension of mtts: any hmtt can be simulated by an mtt, followed by a so called “YIELD-mapping”, and, conversely, any composition of an mtt with a YIELD-mapping can be simulated by an hmtt. This characterization implies that inverse type inference for two-fold compositions of total deterministic mtts can be done in 2-exponential time (a tower of exponents of height 2), while the previously best known algorithm takes 3-exponential time.
منابع مشابه
Type checking XML transformations
XML documents are often generated by some application in order to be processed by a another program. For a correct exchange of information it has to be guaranteed that for correct inputs only correct outputs are produced. The shape of correct documents, i.e., their type, is usually specified by means of schema languages. This thesis is concerned with methods for statically guaranteeing that tra...
متن کاملTowards Practical Typechecking for Macro Tree Transducers
Macro tree transducers (mtt) are an important model that both covers many useful XML transformations and allows decidable exact typechecking. This paper reports our first step toward an implementation of mtt typechecker that has a practical efficiency. Our approach is to represent an input type obtained from a backward inference as an alternating tree automaton, in a style similar to Tozawa’s X...
متن کاملMacro forest transducers
Xml documents conceptually are not trees, but forests. Therefore, we extend the concept of macro tree transducers (mtt’s) to a transformation formalism of forests, macro forest transducers (mft’s). We show that mft’s form a strict superset of mtt’s operating on forests (represented as binary trees). On the other hand, the transformation of every mft can be simulated by the composition of two mt...
متن کاملExact XML Type Checking in Polynomial Time
Stay macro tree transducers (smtts) are an expressive formalism for reasoning about XSLT-like document transformations. Here, we consider the exact type checking problem for smtts. While the problem is decidable, the involved technique of inverse type inference is known to have exponential worst-case complexity (already for top-down transformations without parameters). We present a new adaptive...
متن کاملStreamlining Functional XML Processing∗
Since an XML document has tree structure, XML transformations are ordinarily defined as recursive functions over the tree. Their direct implementation often causes inefficient memory usage because the input XML tree needs to be completely stored in memory. In contrast, XML stream processing can minimize the memory usage and execution time since it begins to output the transformation result befo...
متن کامل